<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″/>
    <link rel="stylesheet" type="text/css" href="../../css/defaultcss.css" />
    <link rel="stylesheet" type="text/css" href="../../css/amazeui.min.css" />
    <script type="text/javascript" src="../../js/jquery-1.9.1.min.js"></script>
    <script src='../../js/amazeui.min.js'></script>
    <script src='../../js/flex.js'></script>
    <script src='../../layer/layer.js'></script>
    <script src='../../js/index.js'></script>
    <link rel="stylesheet" href="../../css/weui.min.css">
    <link rel="stylesheet" href="../../css/css/stylesheets/index.css">

</head>

<body>
    <header>
        <div class="goBack">
            <img src="../../img/base/back.png" alt="返回">
        </div>
        <span class="title"> 申请详情 </span>
    </header>
    <div class="content application_enquiry">
        <form id="fform">
            <ul class="form_ul">
                <li>
                    <label for="">案件名称</label>
                    <input type="text" name="caseName" value="" id="caseName" placeholder="">
                </li>
                <li>
                    <label for="">申请人姓名</label>
                    <input type="text" name="applyName" value="" id="applyName" placeholder="">
                </li>
                <li>
                    <label for="">当事人姓名</label>
                    <input type="text" name="party" value="" id="party" placeholder="">
                </li>
                <li>
                    <label for="">案由</label>
                    <input type="text" name="content" value="" id="content" placeholder="">
                </li>
                <li>
                    <label for="">承办人</label>
                    <input type="text" name="undertaker" value="" id="undertaker" placeholder="">
                </li>
                <!--<li>
                    <label for="">承办单位</label>
                    <input type="text" name="" value="" id="contractorUnit" placeholder="">
                </li>-->
                <li>
                    <div class="weui-cell">
                        <div class="weui-cell__hd"><label for="" class="weui-label">受理日期</label></div>
                        <div class="weui-cell__bd">
                            <input class="weui-input" type="date" value="" id='acceptingTime' name="acceptingTime" />
                        </div>
                    </div>
                </li>
                <!--<li class="type">
                    <label for="contractType">申请人身份</label>
                    <select id="contractType">
                        <option value="律师">律师</option>
                        <option value="当事人等">当事人等</option>
                        <option value="检察人员">检察人员</option>
                    </select>
                </li>-->
                <div class="notice">
                    查询须知
                </div>
                <div class="tips">
                    须知内容
                </div>
            </ul>
        </form>
        <div class="submitBtn">
            <button class="button" id="submit">
						提交申请
					</button>
        </div>
    </div>
    <div class="am-modal am-modal-alert radiusModal" tabindex="-1" id="lawerModal">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">温馨提示</div>
            <div class="am-modal-bd">
                绑定审核中...</br>请耐心等待！
            </div>
            <div class="am-modal-footer">
                <a href=" ./case_list.html ">确定</a>
            </div>
        </div>
    </div>
</body>

</html>

<script type="text/javascript">
    $('.goBack').bind('click', function () {
        window.history.back()
    });
    $("#submit").bind('click', function () {
        var caseName = $("#caseName").val();
        var applyName = $("#applyName").val();
        var party = $('#party').val();
        var content = $('#content').val();
        var undertaker = $('#undertaker').val();
        var acceptingTime = $('#acceptingTime').val();
        if (caseName == "") {
            layer.open({
                title: '提示',
                content: "案件名称不能为空！",
                btn: ['确定'],
            });
            return false;
        } else if (applyName == "") {
            layer.open({
                title: '提示',
                content: "申请人姓名不能为空！",
                btn: ['确定'],
            });
            return false;
        } else if (party == '') {
            layer.open({
                title: '提示',
                content: "当事人姓名不能为空！",
                btn: ['确定'],
            });
            return false;
        } else if (content == "") {
            layer.open({
                title: '提示',
                content: "案由不能为空！",
                btn: ['确定'],
            });
            return false;
        } else if (undertaker == "") {
            layer.open({
                title: '提示',
                content: "承办人不能为空！",
                btn: ['确定'],
            });
            return false;
        } else if (acceptingTime == "") {
            layer.open({
                title: '提示',
                content: "受理日期不能为空！",
                btn: ['确定'],
            });
            return false;
        }
        var form = new FormData($('#fform')[0])
        HYIP.ajax({
            url: '/case/apply.action',
            type: 'post',
            processData: false,
            data: form
        }, function (data) {
            $('#lawerModal').modal('open');
            return false;
        });
        return false;
    })
</script>